
<!-- 登录界面 start  -------->
<div class="lg-box">
	<div class="lg-head">
		<img src="images/logo.png">
	</div>
	<div class="lg-cont" style="display:;">
		<div class='lg-nav'>
			<div class='nav-item active'>手机登录</div>
			<div class='nav-item'>微信登录</div>
		</div>
		<div class="lg-form">
			<!-- 手机登录 start -->
			<div class='form-item' style="display:;">
				<div class='yzmdl'>
					<div class='ipt-item'>

						<div class="tip-box tip-phone-null" style="display: none;">
							<p>手机号不能为空</p>
						</div>
						<div class="tip-box tip-phone-true" style="display: none;">
							<p>请输入正确的手机号</p>
						</div>

						<div class="tip-box tip-phone-check" style="display: none;">
							<p>该手机号未注册</p>
							<a href="#/register">立即注册</a>
						</div>
						<input id="dynamicPhone" class='form-control' placeholder="手机" />
							<!-- onkeydown='dynamicEnter(event);' onkeyup="loginCheckPhone();" -->
							
					</div>
					<div class='ipt-item'>
						<div class="tip-box tip-code" style="display:none;">
							<p style="margin-right:90px;">请输入短信验证码</p>
							<!-- <a href="#">重新获取短信验证码</a> -->
						</div>
						<button id="mobileBut2" class="butn">获取验证码</button>
						<input id="valCode2" class='form-control' placeholder="验证码" />
					</div>
					<a id="dynamicBut" class='btn' style="margin-top: 56px;">登录</a>
				</div>
			</div>
			<!-- 手机登录 end -->

			<!-- 微信登录 start-->
			<div class='form-item' style="display: none;">
				<div id="login_container" class='wx-img'>
					<img class="imgs" id="wximg" src=""> <input id="ticket" type="hidden" />
						<!-- 临时ticket -->
						<div class="infoBox">
							<p class="des1">请使用 微信 扫描二维码登录长芯</p>
							<div style="height: 18px;">
								<p class="wxerrorInfo"></p>
							</div>
						</div>
				</div>
			</div>
			<!-- 微信登录 end-->
		</div>
	</div>
	<!-- 关联账号 start  -->
	<div class='lg-cont' style="display: none;">
		<div class="lg-tit">尚未关联长芯账号</div>
		<div class="wxinfo">
			<div class="wx-box">
				<img class="wximg" src="images/user_pic.png"> <img
					class="wxglimg" src="images/lg_gl.png">
			</div>
			<div class="wxname">微信昵称</div>
		</div>
		<a class="btn" onclick="$('.lg-cont').eq(1).hide();$('.lg-cont').eq(2).show();">关联账号</a>
	</div>
	<!-- 关联账号 end  -->

	<!-- 关联手机 start  -->
	<div class='lg-cont' style="display: none;">
		<div class="lg-tit">账号关联</div>
		<div class='yzmdl'>
			<div class='ipt-item'>
				<div class="tip-box" style="display:none;">
					<p>请输入正确的手机号</p>
				</div>
				<input class='form-control' id="volPhone" placeholder="手机" />
			</div>
			<div class='ipt-item'>
				<div class="tip-box tip-code" style="display:none;">
					<p>请输入短信验证码</p>
					<!-- <a href="#">重新获取短信验证码</a> -->
				</div>
				<button class="butn" id="mobileBut3" style="display:;">获取验证码</button>
				<input class='form-control' id="volCode" placeholder="验证码" />
			</div>
			<!-- <div class='ipt-item'>
				<div class="tip-box" style="display:;">
					<p>请输入邮箱</p>
				</div>
				<input class='form-control' id="email" placeholder="邮箱" />
			</div> -->
			<input type="hidden" id="ticket"/>
			<a class='btn' id="bind-btn">确定</a>
		</div>
	</div>
	<!-- 关联手机 end  -->

	<div class="lg-foot">
		<p>
			还没有账户？请<a href="#/register">注册</a>
		</p>
	</div>
</div>
<!-- 登录界面 end  -------->

<script type="text/javascript" src="js/page/login.js"></script>
<script type="text/javascript" src="js/plugins/sockjs.min.js"></script>
<script type="text/javascript">
    //登录页面，隐藏注册
    //$(".regbut").hide();
    //$(".lgBut").show();
    
    //如登录状态
	/*var token = getMyCookie("accessToken");
	if(token != null && token != undefined && token !=""){	
		location.replace("#/order_add");
	}*/
	//检查登录状态
	checkLogin();
 
	//手机微信登录切换
	$('.nav-item').click(function() {
		var index = $(this).index();
		$('.nav-item').removeClass('active');
		$(this).addClass('active');
		$('.form-item').eq(index).show().siblings().hide();
	})
</script>
